package com.xgg.taiwuinfo.gongfa.abilities;

import android.content.Context;

public class Ability_Cuipo_Body {
    final public int Chest;
    final public int Waist;
    final public int Head;
    final public int LHand;
    final public int RHand;
    final public int LLeg;
    final public int RLeg;
    final public int Spirit;
    final public int Poison;
    final public int Whole;

    public Ability_Cuipo_Body(int body[])
    {
        Chest = body[0];
        Waist = body[1];
        Head = body[2];
        LHand = body[3];
        RHand = body[4];
        LLeg = body[5];
        RLeg = body[6];
        Spirit = body[7];
        Poison = body[8];
        Whole = body[9];
    }

    public String getBodyString(Context ctx)
    {
        StringBuilder bd = new StringBuilder();
        if (Chest > 0) { bd.append(String.format("胸背: %d\r\n" , Chest)); }
        if (Waist > 0) { bd.append(String.format("腰腹: %d\r\n" , Waist)); }
        if (Head > 0) { bd.append(String.format("头颈: %d\r\n" , Head)); }
        if (LHand > 0) { bd.append(String.format("左臂: %d\r\n" , LHand)); }
        if (RHand > 0) { bd.append(String.format("右臂: %d\r\n" , RHand)); }
        if (LLeg > 0) { bd.append(String.format("左腿: %d\r\n" , LLeg)); }
        if (RLeg > 0) { bd.append(String.format("右腿: %d\r\n" , RLeg)); }
        if (Spirit > 0) { bd.append(String.format("心神: %d\r\n" , Spirit)); }
        if (Poison > 0) { bd.append(String.format("毒质: %d\r\n" , Poison)); }
        if (Whole > 0) { bd.append(String.format("全身: %d\r\n" , Whole)); }

        return bd.toString();
    }

    public int getTorso() { return Chest + Waist + Head ; }     //躯干总值
    public int getLimbs() { return LHand + RHand + LLeg + RLeg ; }      //四肢总值

}
